package org.example.common.model.vo;

import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import org.example.common.model.po.base.BasePO;
import org.example.common.validate.annotation.Sex;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

/**
 * @author lsliang
 */
@Setter
@Getter
@ToString
public class TestVO extends BasePO {

    @NotNull
    @Size(min = 2, max = 15, message = "name的长度最小为2最大为15")
    private String name;
    @NotNull
    @Min(value = 5, message = "最小年龄为5")
    private String age;
    @NotNull
    @Sex(message = "性别只能为man或者woman")
    private String sex;
}
